package graduation.project.body;

public class Results {
	
	private final String resultsID;
	private final String originEx; //using expression not simply
	private final String mutantsID;
	private final String testSetID;
	private Result[] records;
	
	public Results(String originEx, String mutantsID, String testSetID){
		resultsID = mutantsID  + '_' + testSetID;
		this.mutantsID = mutantsID;
		this.originEx = originEx;
		this.testSetID = testSetID;
	}
	
	public Results(String originEx, String resultsID, String mutantsID, String testSetID){
		this.originEx = originEx;
		this.resultsID = resultsID;
		this.mutantsID = mutantsID;
		this.testSetID = testSetID;
	}

	public String getResultsID() {
		return resultsID;
	}

	public String getOriginEx() {
		return originEx;
	}

	public String getMutantsID() {
		return mutantsID;
	}

	public String getTestSetID() {
		return testSetID;
	}
	
	public void setRecords(Result[] records){
		this.records = records;
	}
	public Result[] getRecords(){
		return records;
	}
	/*public void addResult(Result r){
		
	}
	public void removeResult(Result r){
		
	}*/
	
	public boolean equals(Object obj){
		if(!(obj instanceof Results))
			return false;
		if(obj == null)
			return false;
		
		Results objec = (Results)obj;
		if(objec.resultsID == this.resultsID)
			return true;
		return false;
	}
	
	public String toString(){
		return "ResultsID: " + resultsID + ", Original Expression: " + originEx + ", Test Set ID: " + testSetID + ", Mutants ID: " + mutantsID;
	}

}
